<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			* {
				margin: 0;
				padding: 0;
			}

			ul {
				width: 726px;
				margin: 20px auto;
				list-style-type: none;
				border: 2px solid red;
			}

			body {
				background-color: rgb(0, 102, 102);
			}

			li {
				position: relative;
				float: left;
				border: 1px solid red;
				padding: 10px;
				margin: 10px;
				background-color: rgb(204, 204, 204);
			}

			img {
				width: 200px;
				height: 200px;
			}
			li:hover{
			   position: relative;
			 /*  left:2px;/*左边往右偏移2px */
			   right: -2px;
			   top:-2px;/*上边往上偏移2px*/
			
			}
			p{
				position:absolute;
				/* 以底边（父标签）为基础向中心偏移 */
				bottom: 40px;
				background-color: red;
				color: #0000FF;
			
			
			}

			.clear-float {
				clear: both;
			}
		</style>
	</head>
	<body>
		<ul>
			<li>
				<img src="img/01.jpg" />
				<p>java学习教程</p>
			</li>
			<li>
				<img src="img/02.jpg" />
				<p>java学习教程</p>
			</li>
			<li>
				<img src="img/03.jpg" />
				<p>java学习教程</p>
			</li>
			<li>
				<img src="img/04.jpg" />
				<p>java学习教程</p>
			</li>
			<li>
				<img src="img/05.jpg" />
				<p>java学习教程</p>
			</li>
			<li>
				<img src="img/06.jpg" />
				<p>java学习教程</p>
			</li>
			<div class="clear-float"></div>

		</ul>
	</body>
</html>
